<script>
export default {
	onLaunch: function() {
		// console.log('App Launch')
		// 手动关闭闪屏，用于解决自动登陆闪现登陆页面问题
		setTimeout(() => {
			// #ifdef APP-PLUS
			plus.navigator.closeSplashscreen();
			// #endif
		}, 1000);

		// 自动登陆
		let loginData = uni.getStorageSync('userInfo');
		if (loginData) {
			uni.reLaunch({
				url: '/pages/app/bookkeeping/bookkeeping'
			});
		} else {
			uni.reLaunch({
				url: '/pages/user/login'
			});
		}
	},
	onShow: function() {
		// console.log('App Show')
	},
	onHide: function() {
		// console.log('App Hide')
	}
};
</script>

<style lang="scss">
@import 'uview-ui/index.scss';

page {
	background-color: #eee;
}
</style>
